﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WMSSyncData.Model;
using WMSSyncData.Model.WMSModel;
using WMSSyncData.Utils;

namespace WMSSyncData.DAL.SqlDB
{
    public class WMS_M_OutStockRMDetailsDAL : BaseSqlDBDAL<WMS_M_OutStockRMDetails>
    {
 
        public List<WMS_M_OutStockRMDetails> GetPOMSyncData()
        {
            var sql = @"SELECT NEWID() AS guid,BillNo,isnull(RelatedBill,' ') RelatedBill,PartNumber,RowNo,OrderNo,BoxNo,Version,DateCode,SupLotNo,PlanQty,RealQty,Unit,0 as Status,Creator,CreateTime,Updator,UpdateTime,Ext1,Ext2,Ext3,Storage_SN,Area_SN,Location_SN,CustomerSN,ExpiryDate,UniqueCode,1 as Data_Status,getdate() as Data_WriteTime,getdate() as Data_ReadTime FROM 
                    dbo.wms_T_OutStockRMRowDetails
                        WHERE Status='8'";

            var dt = SqlDBHelper.GetDataSet(sql).Tables[0];
            var result = MakeTablePackage(dt);
            return result;
        }

 
    }
}
